{% from random import randrange %}
{% from random import uniform %}
{% from pymongo.objectid import ObjectId %} 
{% from apps.common import time_fmt, QuotePrint as hq%}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    {% block title %}
    <title>主页 | 投资智慧</title>
    {% end %}
    <meta name="description" content="投资交流 国信证券">
    <meta name="author" content="洪磊明 国信证券">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if IE]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="{{static_url('css/bootstrap-1.4.min.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{static_url('css/common.css')}}" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
	    {% if current_user %}
	    var g_logged_user = {
			'name': "{{handler.get_secure_cookie('name')}}",
			'uid': "{{handler.get_secure_cookie('uid')}}",
			'email': "{{handler.get_secure_cookie('email')}}"
		}; 
	    {% else %}
	    var g_logged_user = null;
	    {% end %}
	    var g_websocket_host = "{{handler.settings['websocket_host']}}";
	</script>
    <script src="{{static_url('js/jquery-1.7.1.min.js')}}"></script> 
    <script src="{{static_url('js/common.js')}}"></script>   
    <script src="{{static_url('js/sprintf-0.7-beta1.js')}}"></script> 
    {% block js_css %}
    
    {% end %}
  </head>

  <body>

    <div class="topbar">
      <div class="fill">
        <div class="container">
          <a class="brand">国信投资研究
          <img src="{{static_url('img/lab.png')}}" style="width:16px; height:16px;">
          <span class="label important">beta</span>
          </a> 
          <ul class="nav">
            <li><a href="/" target="_blank">资讯交流</a></li>
            <li class="active"><a href="/quote" target="_blank">高速行情</a></li>
            <li><a href="#">投资模型</a></li>
            <li><a href="#contact">研究报告</a></li>
          </ul>
          {% if not current_user %}
          <form id="login" class="pull-right">
	          <input class="input-small" type="text" name="email" placeholder="Email">
	          <input class="input-small" type="password" name="password" placeholder="密码">
	          <a href="#" class="btn success" onclick="login();return false;">登录</a>
	      </form> 
	      {% else %}
	      <ul class="nav secondary-nav">
            <li class="dropdown">
              <a href="#" class="dropdown-toggle">{{handler.get_secure_cookie('name')}}</a>
              <ul class="dropdown-menu">
                <li><a href="#">设 置</a></li> 
                
                <li><a href="/auth/logout">退 出</a></li>
              </ul>
            </li>
          </ul>
	      {% end %}
        
        </div>
      </div>
    </div>

    <div class="container">
		<div class="content">
		{% block content %}
		
		{% end %}
		</div>
    {% block footer %}
      <footer>
        <p>Copyright &copy; 1998-2011 国信证券股份有限公司 　版权所有</p>
      </footer>
	{% end %}
    </div> <!-- /container -->
  </body>
</html> 